-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: auto-set block timestamp for historical queries #15448
Conversation
Should we in a subsequent PR maintain an in-memory cache for historic block times ? Otherwise the extra query seems fine to me! |
i dont think we can reliably use blocks here as the pruning strategies between the two are out of sync fairly often |
Ah I see, this implicitly assumed that the blocks pruning strategy would be more relaxed than the states pruning. If that doesn't hold, then a height-> timestamp map may have to be stored in state machine. (Which does make sense to do) |
Gonna take another approach. Just hack into |
This comment has been minimized.
This comment has been minimized.
…smos-sdk into bez/12226-auto-timestamp-query
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this consensus breaking or is metadata outside the app hash
As far as I understand the metadata is not included in the app hash. Please confirm that's how it works @alexanderbez |
Correct @facundomedica, this is not consensus breaking, only the resulting hash is used. |
(cherry picked from commit ee9774a) # Conflicts: # CHANGELOG.md # api/cosmos/base/store/v1beta1/commit_info.pulsar.go # baseapp/abci.go # go.sum # simapp/go.mod # simapp/go.sum # store/go.mod # store/rootmulti/store.go # store/types/commit_info.pb.go # tests/go.mod # tests/go.sum # types/errors/errors.go
… (#15573) Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Awesome!! |
…440) Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
…(backport #440) (#441) * feat: auto-set block timestamp for historical queries (cosmos#15448) (backport #440) * updates * updates * updates --------- Co-authored-by: Roman <roman@osmosis.team>
…(backport #440) (#442) * feat: auto-set block timestamp for historical queries (cosmos#15448) (backport #440) * go mod tidy --------- Co-authored-by: Roman <roman@osmosis.team>
…s#15448) (cosmos#15573) Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Description
Closes: #12226
This change automatically set's the block time on the
Context
that is provided to all queries. It does this by querying for theCommitInfo
for that particular version/height from the RMS.cc @ValarDragon @tac0turtle @julienrbrt
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change